package com.delong.util;

import java.util.zip.CRC32;
import java.util.zip.Checksum;

public class ReadFileCrc32Util {

	/**
	 * read file bytes and return the crc32 value
	 * @param bytes
	 * @return
	 */
	public static long readCrc32FromBytes(byte[] bytes) {
		Checksum checksum = new CRC32();
		checksum.update(bytes, 0, bytes.length);
		long checksumValue = checksum.getValue();
		return checksumValue;
	}
	
	
}
